from db import db
from db import BaseFul
from db.app_user.app_user_tb import App_user
from sqlalchemy.orm import relationship


# 整体歌单
class SongList(BaseFul):
    song_list_name = db.Column(db.String(50), default="简单的歌")
    user_id = db.Column(db.ForeignKey(App_user.id, ondelete='set null'))
    user = relationship(App_user, primaryjoin='SongList.user_id==App_user.id', backref='song_list')
    song_list_img = db.Column(db.TEXT, nullable=True)
    song_list_tag = db.Column(db.String(20))
    song_list_item = db.Column(db.VARCHAR(256))
    song_list_type = db.Column(db.String(20))
